All Questions
Tagged with performancepython-3.x
646 questions
8votes
2answers
920views
2D block game like Minecraft
I have been working on a 2D block game. I like the progress I am making, but I would like to improve the performance and the overall quality of the code. The code and textures are stored in my GitHub ...
6votes
2answers
232views
(HackerRank) Project Euler+ #250: 250250
Link to problem: linkNumber of solvers: 27 out of 844Solve rate (per person): 3.199%Success rate (over all submissions): 1.78% Project Euler+ on HackerRank is basically supposed to be a generalization ...
3votes
1answer
93views
Optimizing sieving code for the Multiple Polynomial Quadratic Sieve
I wrote code for the multiple polynomial quadratic sieve (MPQS) here: ...
2votes
2answers
250views
Infinite 2d block world (2d minecraft) with chunk system, physics and slower loading
Follow up from this question. I have added a slower loading system that allows the main game to run faster but I still get under 30 fps with caves even if I allow the player to outrun the loading. I ...
4votes
1answer
117views
Calculate optimal game upgrades, v2
This is the second iteration of the code I originally posted here: Calculate optimal game upgrades. Based on the feedback there, I chose to change the code to use a dynamic programming approach with ...
3votes
4answers
1kviews
Calculate optimal game upgrades
I'm looking for ways to improve the performance of this code. Using numba helps performance, but I'm not sure how to further improve it. Any (relatively) simple ...
7votes
3answers
830views
Generate all the free polyominoes who's width and height is no larger than 8
I'm working on a puzzle game and I need all the free polyominoes that can fit into an 8 by 8 grid. My code uses Redelmeier's Alogorithm for enumerating them, checks them for rotations and reflections, ...
1vote
2answers
138views
Printing a pattern of input string in X shape
Context: Write a program to print the output for the given input(Example is given in comments of my code). String is of odd length. I would be grateful if anyone could give feedback on my following ...
7votes
5answers
815views
adding data to a CSV file for it to be read
I'm making a program that lets you enter a name and house that adds it to the CSV file for it to be read and print out "Tre is in house Dragon", etc. The code works; I'm just wondering if ...
1vote
1answer
284views
Rules-engine to be improved/simplified for Efficiency (performance), Extensibility and Maintenance?
This is a simple implementation of a rules engine. I am really hating the very long MATCH/CASE function. I am wondering what kind of Design Patterns could be used there to make this code more ...
3votes
5answers
2kviews
How do I speed up this simulation program
This is a program to solve a differential equation numerically using Euler method. As of now, it is very slow, and I need to run 10000 Monte Carlo simulations. The differential equation is called ...
1vote
2answers
74views
Using odd prime powers, my heuristic tries to solve instances of Exact 3 Cover in polytime, what can be done to optimize it?
By the way, a heuristic is not the same thing as a proven working algorithm that solves all input instances. It could either be experimental or be used to study intricacies in a problem. The purpose ...
3votes
1answer
86views
Scraping website with Python and Selenium to collect data from dynamic website
Summary: The code scrapes the website and collects the data to store it in CSV. It also downloads selected information that is available for download in PDF format. The details and the entire code are ...
4votes
4answers
1kviews
Creating an O(n) algorithm for an array of integers
To avoid plagiarism in my university, I am going to modify the problem. Henry likes to jump from building to building. The heights of each building are given as a list of H numbers. We also number ...
5votes
2answers
330views
Simple version of NEAT
I have wrote my own simple version of NEAT and want to improve the code for mainly performance (training and runtime of a generation). This simple version of NEAT aims to perform somewhere near as ...